#ifndef ORDERPAGE_H
#define ORDERPAGE_H

#include <QtGui/QWidget>
#include <QMessageBox>
#include <QFontMetrics>
#include "ui_orderpage.h"
#include "previewform.h"
#include "orderform.h"
#include "productform.h"
#include "mybutton.h"
#include "order.h"
#include <QDomDocument>
#include <QTextStream>
#include <QTextCodec>
#include <QPrinter>
#include <QPainter>
#include <QPrintDialog>
#include <QList>
#include <QFont>
#include <QString>
#include <QColor>
#include <QBrush>
#include <QRect>
#include <qfile.h>
#include <QPixmap>
#include <QBitmap>
#include "addform.h"
#include "collection.h"

class OrderPage : public QWidget
{
    Q_OBJECT

public:
    OrderPage(QWidget *parent = 0);
    ~OrderPage();
    
private:
	bool AddRowInOrderTable(const COrder &);
	bool PrintPreview(QString &order_number);
    
public slots:
	void NewOrder();
	int OpenOrder(QListWidgetItem*);
	int OpenOrder(QTableWidgetItem*);
	int SaveOrPrintOrder();
    void UpdateFirstTab();  
	bool SendFileToPrepress();
	void CloseOrder();
    int FindOrder();
    int PutToTrash();
    void SetFind();
    void OpenDirForm();
    
    void OpenCollection();
    int createCollection();

public:
	Ui::OrderPageClass ui;
	PreviewForm *preview;
	AddForm add_form;
	Collection collection_form;
};

#endif // ORDERPAGE_H